/**
 * Copyright (c) 2011 Tomi Paananen.
 *
 * Part of Quick Gestures engine library.
 */

#ifndef __SIMPLECLASSIFIER_H__
#define __SIMPLECLASSIFIER_H__

// qgengine includes
#include "classifierif.h"
#include "gesture.h"

// Forward declarations
class GestureProcessor;


class QGLIB_EXPORT SimpleClassifier : public ClassifierIf
{
public: // Construction and destruction
    SimpleClassifier();
    virtual ~SimpleClassifier();

public: // From ClassifierIf
    int compare(Gesture *gesture, Gesture *candidate);
    int recognitionThreshold();

public:
    void setRecognitionThreshold(int threshold);

protected:
    int errorFixedInitPointAndDirection(const PointList &gesturePoints,
                                        const PointList &candidatePoints);
    int errorFixedDirection(const PointList &gesturePoints,
                            const PointList &candidatePoints,
                            int startingIndex = 0);
    int errorStatic(const PointList &gesturePoints,
                    const PointList &candidatePoints);
    int errorStaticUsingLines(const PointList &gesturePoints,
                              const PointList &candidatePoints);

private: // Data
    GestureProcessor *m_processor; // Owned
    int m_recognitionThreshold;
};


#endif /* __SIMPLECLASSIFIER_H__ */

// End of file.
